unit Checkers.Base;

interface

type

  TBoardSize = class
  private
    FCellsCount: Integer;
    FWidth: Integer;
    FHeight: Integer;
    function GetWidth():Integer;
    function GetHeight():Integer;
    function GetCellsCount():Integer;
  public
    constructor Create(AWith, AHeight: Integer);
    property Width: Integer read GetWidth;
    property Height: Integer read GetHeight;
    property CellsCount: Integer read GetCellsCount;
  end;

implementation

{ TBoardSize }

constructor TBoardSize.Create(AWith, AHeight: Integer);
begin
  FWidth := AWith;
  FHeight := AHeight;
  FCellsCount := FWidth * FHeight;
end;

function TBoardSize.GetCellsCount: Integer;
begin
  Result := FCellsCount;
end;

function TBoardSize.GetHeight: Integer;
begin
  Result := FWidth;
end;

function TBoardSize.GetWidth: Integer;
begin
  Result := FHeight;
end;

end.
